package staticattirbute;

public class StaticAtribute {
    private static final String xx = "aaa";

    public static void main(String[] args) {
        //方法一
        new AnimalInterfice() {
            private String innerName;

            @Override
            public void getName(String innerName) {
                System.out.println("lai");
                this.innerName = innerName;
                System.out.println("innerName: " + this.innerName);
            }
        }.getName("in name is  haha");


        //方法二
        AnimalInterfice animalInterfice = new AnimalInterfice() {
            @Override
            public void getName(String name) {
                System.out.println("22222");
                a();
            }

            public void a() {
                System.out.println("2aaaa");
            }
        };
        animalInterfice.getName("sss");
    }


}
